/* pages/profile/advice/chat/chat.scss */
.chat-container {
  display: flex;
  flex-direction: column;
  height: 100vh;
  background-color: #f8f9fa;
}

/* 医生信息栏 */
.doctor-header {
  display: flex;
  align-items: center;
  padding: 20rpx;
  background: white;
  border-bottom: 1rpx solid #e8e8e8;
  position: sticky;
  top: 0;
  z-index: 100;
}

.doctor-avatar {
  width: 80rpx;
  height: 80rpx;
  border-radius: 50%;
  margin-right: 16rpx;
}

.doctor-info {
  flex: 1;
}

.doctor-name {
  font-size: 28rpx;
  font-weight: 600;
  color: #333;
  display: block;
  margin-bottom: 4rpx;
}

.doctor-title {
  font-size: 24rpx;
  color: #1890ff;
  display: block;
  margin-bottom: 4rpx;
}

.doctor-status {
  font-size: 22rpx;
  color: #999;
}

.doctor-status.online {
  color: #52c41a;
}

.header-actions {
  display: flex;
  gap: 8rpx;
}

.action-btn {
  width: 60rpx;
  height: 60rpx;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24rpx;
  border: none;
}

.call-btn {
  background: #52c41a;
  color: white;
}

.detail-btn {
  background: #f0f0f0;
  color: #666;
}

.end-btn {
  background: #ff4d4f;
  color: white;
  font-size: 20rpx;
}

/* 状态横幅 */
.status-banner {
  padding: 16rpx 20rpx;
  text-align: center;
  font-size: 24rpx;
  font-weight: 500;
}

.status-banner.pending {
  background: #fff7e6;
  color: #fa8c16;
}

.status-banner.completed {
  background: #f6ffed;
  color: #52c41a;
}

/* 消息容器 */
.messages-container {
  flex: 1;
  padding: 20rpx;
}

.messages-list {
  display: flex;
  flex-direction: column;
  gap: 16rpx;
}

/* 消息项 */
.message-item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.message-item.doctor {
  align-items: flex-end;
}

/* 消息时间 */
.message-time {
  font-size: 22rpx;
  color: #999;
  text-align: center;
  margin: 20rpx 0;
  padding: 8rpx 16rpx;
  background: rgba(0, 0, 0, 0.05);
  border-radius: 20rpx;
  align-self: center;
}

.message-time-small {
  font-size: 20rpx;
  color: #999;
  margin-top: 4rpx;
}

.message-item.doctor .message-time-small {
  text-align: right;
}

/* 消息气泡 */
.message-bubble {
  max-width: 70%;
  padding: 16rpx 20rpx;
  border-radius: 12rpx;
  background: white;
  box-shadow: 0 2rpx 8rpx rgba(0, 0, 0, 0.1);
  position: relative;
}

.message-item.doctor .message-bubble {
  background: #1890ff;
  color: white;
}

.message-text {
  font-size: 26rpx;
  line-height: 1.4;
  word-break: break-word;
}

.message-item.doctor .message-text {
  color: white;
}

/* 图片消息 */
.image-bubble {
  padding: 8rpx;
  background: white;
}

.message-image {
  width: 200rpx;
  height: 200rpx;
  border-radius: 8rpx;
}

.message-item.doctor .image-bubble {
  background: #1890ff;
}

/* 正在输入提示 */
.typing-indicator {
  display: flex;
  align-items: center;
  padding: 16rpx 20rpx;
  background: white;
  border-radius: 12rpx;
  box-shadow: 0 2rpx 8rpx rgba(0, 0, 0, 0.1);
  max-width: 120rpx;
}

.typing-dots {
  display: flex;
  gap: 4rpx;
  margin-right: 12rpx;
}

.dot {
  width: 8rpx;
  height: 8rpx;
  border-radius: 50%;
  background: #999;
  animation: typing 1.4s infinite ease-in-out;
}

.dot:nth-child(1) {
  animation-delay: -0.32s;
}

.dot:nth-child(2) {
  animation-delay: -0.16s;
}

@keyframes typing {
  0%, 80%, 100% {
    transform: scale(0);
  }
  40% {
    transform: scale(1);
  }
}

.typing-text {
  font-size: 22rpx;
  color: #999;
}

/* 快速回复 */
.quick-replies {
  display: flex;
  gap: 12rpx;
  padding: 16rpx 20rpx;
  background: white;
  border-top: 1rpx solid #e8e8e8;
  overflow-x: auto;
}

.quick-reply-item {
  padding: 12rpx 20rpx;
  background: #f0f0f0;
  color: #666;
  border-radius: 20rpx;
  font-size: 24rpx;
  white-space: nowrap;
  flex-shrink: 0;
}

.quick-reply-item:active {
  background: #e6f7ff;
  color: #1890ff;
}

/* 输入区域 */
.input-container {
  background: white;
  border-top: 1rpx solid #e8e8e8;
  padding: 20rpx;
}

.input-box {
  display: flex;
  align-items: flex-end;
  gap: 12rpx;
  margin-bottom: 12rpx;
}

.message-input {
  flex: 1;
  padding: 16rpx 20rpx;
  border: 2rpx solid #e8e8e8;
  border-radius: 24rpx;
  font-size: 26rpx;
  color: #333;
  background: #f8f9fa;
  min-height: 80rpx;
  max-height: 200rpx;
}

.send-btn {
  padding: 16rpx 24rpx;
  background: #d9d9d9;
  color: #999;
  border-radius: 24rpx;
  font-size: 26rpx;
  border: none;
  transition: all 0.3s ease;
}

.send-btn.active {
  background: #1890ff;
  color: white;
}

.input-actions {
  display: flex;
  gap: 12rpx;
  justify-content: center;
}

.input-actions .action-btn {
  width: 60rpx;
  height: 60rpx;
  border-radius: 50%;
  background: #f0f0f0;
  color: #666;
  font-size: 24rpx;
  display: flex;
  align-items: center;
  justify-content: center;
}

.input-actions .action-btn:active {
  background: #e6f7ff;
  color: #1890ff;
}

/* 咨询结束提示 */
.end-consultation-tip {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 40rpx 20rpx;
  background: white;
  border-top: 1rpx solid #e8e8e8;
}

.tip-text {
  font-size: 26rpx;
  color: #666;
  margin-bottom: 20rpx;
}

.rate-btn {
  padding: 16rpx 32rpx;
  background: #1890ff;
  color: white;
  border-radius: 8rpx;
  font-size: 24rpx;
  border: none;
}
